<!--
  @author songweidong
  @date 2019-07-10 16:14:28
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<html th:replace="~{work/modify/common/layout :: layout('工单照片', ~{::title}, ~{::content}, ~{::script})}">
<head>
    <title>工单管理-工单照片</title>
</head>
<body>

<div th:fragment="content">
    <style>
        .eg-images li img {
            display: none;
        }

        .audit-reason:hover {
            cursor: pointer;
        }

        .audit-reason {
            font-size: 8px;
            color: #1E9FFF;
            text-decoration: underline;
        }

        .audit {
            font-size: 8px;
            color: gray;
        }

        .btn-delete{
            display: none;
        }
    </style>
    <form class="layui-form">
        <input type="hidden" id="casSign" name="casSign" th:value="${casSign}"/>
        <input id="work-id" type="hidden" name="workId" th:value="${workId}"/>
        <input id="order-id" type="hidden" name="orderId" th:value="${orderId}"/>

        <div class="layui-card">

            <!-- 微笑行动 -->
            <div class="layui-form-item" th:unless="${#strings.isEmpty(zsOrderPhotoVO.smileActionSrc)}">
                <div class="layui-card-header" style="margin-top:10px;"><b>微笑行动照&nbsp;&nbsp;</b>
                    <span style="font-size: 12px;color: rgb(255,0,0)"></span>
                </div>
                <div class="layui-card-body">
                    <div class="layui-input-block layui-form-item" style="width: 800px">
                        <div class="layui-inline applique-list">
                            <input type="hidden"
                                   name="smileSscpId"
                                   th:value="${zsOrderPhotoVO.smileSscpId}">
                            <div class="smile-action-image">
                                <img th:src="${zsOrderPhotoVO.smileActionSrc}"
                                     th:layer-src="${zsOrderPhotoVO.smileActionSrc}"
                                     alt="微笑行动照"
                                     style="width: 200px; height: 200px">
                            </div>
                        </div>
                        <div class="layui-form-item" id="takeffect-radio-smile-action">
                            <input type="radio"
                                   name="smileAuditStatus"
                                   value="1"
                                   title="未审核"
                                   lay-verify="required"
                                   th:checked="${zsOrderPhotoVO.smileAuditStatus == 1 ? true :false}">
                            <input type="radio"
                                   name="smileAuditStatus"
                                   value="2"
                                   title="审核成功"
                                   lay-verify="required"
                                   th:checked="${zsOrderPhotoVO.smileAuditStatus == 2 ? true :false}">
                            <input type="radio"
                                   name="smileAuditStatus"
                                   value="3"
                                   title="审核失败"
                                   lay-verify="required"
                                   th:checked="${zsOrderPhotoVO.smileAuditStatus == 3 ? true :false}">
                        </div>
                    </div>
                </div>
            </div>

            <!-- 附件照片审核 -->
            <div class="layui-form-item" th:unless="${#lists.isEmpty(zsOrderPhotoVO.attachmentDetailGroupVOList)}">
                <div class="attachmentList layui-form-item" th:each="groupItem, groupStat : ${zsOrderPhotoVO.attachmentDetailGroupVOList}">
                    <div class="layui-card-header" style="margin-top:10px;">
                        <b th:text="${groupItem.typeName}"></b>
                        <span style="font-size: 12px;color: rgb(255,0,0)">若上月派单工单，下月5号往后不可标示</span>
                        <span style="cursor:pointer" th:if="${groupItem.egSrc != null}">
                            <ul class="eg-images">
                                <li>
                                    <label style="color: #1E9FFF;cursor:pointer;">查看例图</label>
                                    <img th:src="${groupItem.egSrc}">
                                </li>
                            </ul>
                        </span>
                    </div>

                    <label class="layui-form-label" style="width: 60px"></label>
                    <div class="layui-input-block layui-col-space10">
                        <div class="layui-col-md2 group-detail" th:each="detailItem, detailStat : ${groupItem.attachmentDetailVOList}">
                            <input type="hidden" name="attachmentId" th:id="|${detailStat.index}attachmentId|" th:value="${detailItem?.attachmentId}"/>
                            <input type="hidden" name="aiAuditStatus" th:id="|${detailStat.index}aiAuditStatus|" th:value="${detailItem?.aiAuditStatus}"/>

                            <div class="layui-inline attachment-images">
                                <img th:src="|${detailItem?.src}|" style="width: 100px;height: 100px;">
                            </div>
                            <div th:title="|${detailItem?.aiAuditStatus == 1 ? '点击查看原因' : ''}|"
                                 th:class="|${detailItem?.aiAuditStatus == 1 ? 'audit-reason' : 'audit' }|"
                                 th:text="|${detailItem?.aiAuditStatus == 1 ? 'AI审核结果：不合格' : detailItem?.aiAuditStatus == 2 ? 'AI审核结果：合格' : ''}|"
                                 th:audit-desc="|${detailItem?.aiAuditStatus == 1 ? detailItem?.aiAuditDesc : 'audit' }|"
                            ></div>

                            <!-- 人工审核按钮 -->
                            <div th:if="${detailItem?.needReview} == 2">
                                <div class="layui-form-item" style="margin-top: 5px;">
                                    <input type="radio"
                                           th:name="|reviewStatus-${detailItem?.attachmentId}|"
                                           value="2"
                                           title="合格"
                                           lay-verify="otherReq"
                                           th:checked="${detailItem?.reviewStatus == 2}">
                                    <br>
                                    <input type="radio"
                                           th:name="|reviewStatus-${detailItem?.attachmentId}|"
                                           value="1"
                                           title="不合格"
                                           lay-verify="otherReq"
                                           th:checked="${detailItem?.reviewStatus == 1}">
                                </div>
                            </div>
                            <div th:unless="${detailItem?.needReview} == 2">
                                <div class="layui-form-item"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <!-- 其他照片 -->
          <!--  <div class="layui-card-header" style="margin-top:10px;"><b>其他照片&nbsp;&nbsp;</b>
                <span style="font-size: 12px;color: rgb(255,0,0)">单张图片大小5M以内，支持jpg、jpeg、png格式图片上传</span>
            </div>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 60px"></label>
                <div class="layui-input-block layui-col-space10">
                    <div class="layui-col-md2" th:each="item,ind : ${new int[10]}">
                        <div class="layui-inline">
                            <div class="layui-upload-drag" th:id="|imageSrcUrl${ind.index}|"
                                 style="position: relative;">
                                <div>
                                    <input type="hidden" class="img-url" th:id="|imageSrcUrl${ind.index}Value|">
                                    <i class="layui-icon"></i>
                                    <p>点击上传</p>
                                    <img th:id="|imageSrcUrl${ind.index}Values|">
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <i class="layui-icon layui-icon-search btn-review"></i><br>
                            <i class="layui-icon layui-icon-delete btn-delete"></i>
                        </div>
                    </div>
                </div>
            </div>-->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 60px">备注</label>
            <div class="layui-inline" style="width: 800px;">
                <textarea name="operatorRemark" class="layui-textarea" placeholder="请输入" maxlength="1000"></textarea>
            </div>
        </div>

        <div class="layui-form-item" style="text-align: center;margin-top: 30px;">
            <div class="layui-inline">
                <button class="layui-btn layui-btn-normal" lay-submit>保存</button>
            </div>
        </div>

    </form>

</div>

<script th:inline="javascript">

    var zsOrderPhotoVO = [[${zsOrderPhotoVO}]];

    var layuiModel = {
        oms_work_modify_orderphoto: "work/modify/zmn.oms.work.modify.orderphoto"
    };
</script>
</body>
</html>